﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="pgClave.aspx.cs" Inherits="EGuayas.Web.pgClave" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
    <link  href="Resources/css/StyleLogin.css"  rel="stylesheet" />
    <!-- Load Ext JS --> 
    <script src="Resources/js/Global.js"></script>
    <style type="text/css">
        .style1
        {
            height: 26px;
        }
        .style2
        {
            height: 17px;
        }
    </style>
</head>
 <script type="text/javascript">
   
 </script>
<body>
<!-- Maquetado y aplicar css Login by: Diana Ortega Salinas -->
<!--Diseño grafico: Ideabox -->
    <form id="form1" runat="server">
            <ext:ResourceManager ID="ResourceManager2" runat="server" DisableViewState="false" EnableViewState="true" /> 
            <div id="header">
                     <div id="header-welcome"/>
                </div>
            <div id="content-wrapper" class="clearfixd">
                <div id="izquierda"></div>
                 <div id="derecha"></div>
                     <div id="content-wrapper-welcome">
                      <div id="main-content-welcome" class="clearfixd">
                        <div id="actions-cont-welcome">
                          <div id="title-welcome">Recuperar clave</div>
                            <div id="msg-welcome">
                    
                                <p>
                                   Si no recuerda la clave de registro, por favor ingrese: nombre de usuario y texto de <i>captcha</i> que se muestra a continuación: 
                        
                                </p>
                                <div id="nav-home-welcome">
                                  
                                 <captcha:CaptchaControl ID="imageCaptcha" runat="server" 
                                         CaptchaBackgroundNoise="Low" CaptchaLength="5" CustomValidatorErrorMessage="Texto incorrecto"
                                         CaptchaHeight="55" CaptchaWidth="245"
                                         CaptchaLineNoise="None" CaptchaMinTimeout="5"
                                         CaptchaMaxTimeout="240" FontColor = "#225B2E" />
                               </div>
                                <p>
                                   Y haga click en el botón <b>Aceptar</b>.     En breve recibirá la clave a su respectivo correo. 
                        
                                </p>
                            </div>
                
                        </div>
  
                        <div id="login-cont-welcome">
                         <div id="inner-login-cont">
                          
                            
                              <ext:TextField                   
                                    ID="txtUsername" 
                                    FieldCls="txtborder"
                                    runat="server"                     
                                    FieldLabel="Usuario" 
                                    AllowBlank="false"
                                    BlankText="Usuario requerido"
                                    Width="250"
                                    Padding="5"
                                     />
                   
                                <ext:TextField                   
                                    ID="txtCapcha" 
                                    FieldCls="txtborder"
                                    runat="server"                     
                                    FieldLabel="Capcha" 
                                    AllowBlank="false"
                                     MaxLength="5"
                                     MaxLengthText="Ingrese almenos 5 caracteres"
                                    BlankText="Ingrese valor capcha"
                                    Width="250"
                                    Padding="5"
                                     />
                               <br />
                              <ext:Label ID="lblMessage" runat="server" /> 
                             <ext:ImageButton ID="btnAceptar" runat="server"  Align="Right" Margin="10" Padding="15"
                                OverImageUrl="Resources/css/img_global/login_btn_aceptar02.png"
                                ImageUrl="Resources/css/img_global/login_btn_aceptar01.png">
                                <Listeners>
                                    <Click Handler="
                                        if (!#{txtUsername}.validate() && !#{txtCapcha}.validate()) {
                                            Ext.Msg.alert('Error','Ingrese datos requeridos');
                                            // return false to prevent the btnLogin_Click Ajax Click event from firing.
                                            return false; 
                                        }" />
                                </Listeners>
                                <DirectEvents>
                                    <Click OnEvent="btnAceptar_Click">
                                     <ExtraParams>
                                        <ext:Parameter Name="user"  Value ="#{txtUsername}.getValue()"   Mode="Raw" /> 
                                        <ext:Parameter Name="clave"  Value ="#{txtCapcha}.getValue()"   Mode="Raw" /> 
                                    </ExtraParams>
                                        <EventMask ShowMask="true" Msg="Verificando..." MinDelay="500" />
                                    </Click>
                                </DirectEvents>
                              </ext:ImageButton>
                                <ext:ImageButton ID="btnLogin" runat="server"  Align="Right" Margin="10" Padding="15"                   
                                ImageUrl="Resources/css/img_global/login_btn_ingresar03.png">
                                <Listeners>
                                      <Click Handler="window.location.href = './pgLogin.aspx';" ></Click>
                                </Listeners>
                  
                              </ext:ImageButton>
                            
                   
                            </div>
                        </div>
            
                    </div><!--fin #main-content-welcome -->
        
                    </div>
                    <div id="login-footer"> </div>  
                </div>
            <ext:XScript ID="XScript1" runat="server">
                    <script type="text/javascript">
                        var pgFn = new Object();
                        //Msg de error
                        pgFn.HandleError = function (result) {
                            Ext.Msg.show({
                                title: 'Error',
                                msg: 'Usuario y clave no valido',
                                buttons: Ext.Msg.ERROR,                   
                                animEl: 'elId'
                            });
                       };
           
                   </script>
                </ext:XScript>
    </form>
</body>
</html>
